package cn.exrick.xboot.modules.Information.entity;

import cn.exrick.xboot.base.XbootBaseEntity;
import cn.exrick.xboot.modules.activiti.entity.business.EventReport;
import cn.exrick.xboot.modules.base.entity.User;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * @author lijian
 */
@Data
@Entity
@Table(name = "t_river_tour_history")
@TableName("t_river_tour_history")
@ApiModel(value = "巡河历史表")
public class RiverTourHistory extends XbootBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "河流名称")
    private String riverName;

    @ApiModelProperty(value = "河流ID")
    private String riverId;

    @CreatedDate
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "巡河开始时间")
    private Date patrolStartTime;

    @CreatedDate
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "巡河结束时间")
    private Date patrolEndTime;

    @ApiModelProperty(value = "巡检里程")
    private String patrolSpeed;

    @ApiModelProperty(value = "巡检速度")
    private String patrolCourse;

    @ApiModelProperty(value = "巡检人")
    private String patrolUser;

    @ApiModelProperty(value = "巡检人ID")
    private String userId;

    @ApiModelProperty(value = "经度")
    private String longitude;

    @ApiModelProperty(value = "纬度")
    private String dimensionality;

    @ApiModelProperty(value = "轨迹")
    private String locus;

    @Transient
    @TableField(exist = false)
    @ApiModelProperty(value = "巡河人员用户信息")
    private User user;

    @Transient
    @TableField(exist = false)
    @ApiModelProperty(value = "巡河人员用户信息")
    private List<EventReport> eventReport;

}